<%!
static java.text.SimpleDateFormat p_sdf = 
	new java.text.SimpleDateFormat(git.bankview.sl.Globals.FORMAT_DATE);
static java.text.SimpleDateFormat p_sdtf = 
	new java.text.SimpleDateFormat(git.bankview.sl.Globals.FORMAT_DATETIME);

public static java.sql.Date sqlDate(String str)
	throws java.text.ParseException
{
	if (null != str && 0 < str.length())
		return new java.sql.Date(p_sdf.parse(str).getTime());
	return null;
}
public static String cstr(java.sql.Date d)
{
	return null == d ? "--" : p_sdf.format(d);
}
public static String cstr(java.util.Date d)
{
	return null == d ? "--" : p_sdtf.format(d);
}
public static String cstr(java.sql.Clob obj)
	throws java.io.IOException, java.sql.SQLException
{
	java.io.Reader reader = obj.getCharacterStream();
	char[] buff = new char[1024];
	int nReadCount;
	StringBuffer str = new StringBuffer();
	while (0 <= (nReadCount = reader.read(buff, 0, buff.length)))
	{
		str.append(new String(buff, 0, nReadCount));
	}
	return str.toString();
}
%>